﻿@{
    Layout = "~/Views/Shared/_LayoutMain.cshtml";
    ViewBag.Title = ViewBag.Title;
    var course = ViewBag.CourseInfo as XZL.Web.Entity.Course;
}

<div class="ci_Top">
    <img class="ci_courseImg" id="ci_courseImg" src="@course.CourseInfoImg" />
    <div class="ci_TopTextBG">
    </div>
    <div class="ci_TopText"><img src="~/Image/icoShiping.png" />&nbsp;&nbsp;@course.CourseName</div>
</div>
<div id="divBuy" style="line-height:40px; color:orange;font-size:16px;">
   
</div>

<div id="divFinished" style="line-height:60px; text-align:center; color:green;font-size:16px;">
    <b>@ViewBag.Info</b><br />
    <span class="customBtn" onclick="document.location='../../MyInfo/MyCourse'">我的课程</span>
</div>

<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
    wx.config({
        debug: false,
        appId: "@ViewBag.AppID",
        timestamp: "@ViewBag.Timestamp",
        nonceStr: "@ViewBag.NonceStr",
        signature: "@ViewBag.Sign",
        jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage'] // 功能列表，我们要使用JS-SDK的什么功能
    });

    wx.ready(function () {
        // 获取“分享到朋友圈”按钮点击状态及自定义分享内容接口
        wx.onMenuShareTimeline({
            title: '推荐 网非网络学院好课程：@course.CourseName', // 分享标题
            link: "@ViewBag.Url",
            imgUrl: "@course.CourseInfoImg", // 分享图标
        });

        // 获取“分享给朋友”按钮点击状态及自定义分享内容接口
        wx.onMenuShareAppMessage({
            title: '推荐 网非网络学院好课程：@course.CourseName', // 分享标题
            desc: "网非网课，价值199元倪志勇邀请您免费来学习，快来点击！", // 分享描述
            link: "@ViewBag.Url",
            imgUrl: "@course.CourseInfoImg", // 分享图标
            type: 'link', // 分享类型,music、video或link，不填默认为link
        });
        //wx.error(function (res) {
        //    alert('wx.error: ' + JSON.stringify(res));
        //});
    });
</script>
